<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
<script>
    function User(username, password, occupation){
        this.username = username;
        this.password = password;
        this.occupation = occupation;
    }
    User.prototype.showUser = function() {
        console.log('Username: ' + this.username);
        console.log('Password: ' + this.password);
        console.log('Occupation: ' + this.occupation);
    }
    var user1 = new User('mozart','1234','composer')

    user1.showUser()

    /*请根据上述两条语句的提示，编写出相应的构造函数User, 通过实例对象调用showUser()方法，在页面中显示出该对象的username,password,occupation。*/
</script>
</body>
</html>

